home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume16 / lc / patch2 < prev    next >
Encoding:
Internet Message Format  |  1991-02-05  |  9.0 KB

  1. From: kent@sparky.imd.sterling.com (Kent Landfield)
  2. Newsgroups: comp.sources.misc
  3. Subject: v16i093:  lc - Categorize and List Files In Columns, Patch2
  4. Message-ID: <1991Feb4.045206.2512@sparky.IMD.Sterling.COM>
  5. Date: 4 Feb 91 04:52:06 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: b9cca079 92eb99fa 88880229 fb791f9a
  8.  
  9. Submitted-by: kent@sparky.imd.sterling.com (Kent Landfield)
  10. Posting-number: Volume 16, Issue 93
  11. Archive-name: lc/patch2
  12. Patch-To: lc: Volume 14, Issue 82-83
  13.  
  14. This is the second patch to lc. This patch contains modifications so
  15. that lc will compile on Apollo systems.
  16.  
  17. -Kent+
  18. -------
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then feed it
  21. # into a shell via "sh file" or similar.  To overwrite existing files,
  22. # type "sh file -c".
  23. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  24. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  25. # If this archive is complete, you will see the following message at the end:
  26. #        "End of shell archive."
  27. # Contents:  lc.patch2
  28. # Wrapped by kent@sparky on Sun Feb  3 22:47:20 1991
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'lc.patch2' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'lc.patch2'\"
  32. else
  33. echo shar: Extracting \"'lc.patch2'\" \(7138 characters\)
  34. sed "s/^X//" >'lc.patch2' <<'END_OF_FILE'
  35. Xdiff -c ../lc.old/README ./README
  36. X*** ../lc.old/README    Sun Feb  3 22:20:06 1991
  37. X--- ./README    Sun Feb  3 22:25:46 1991
  38. X***************
  39. X*** 1,7 ****
  40. X  
  41. X              LC
  42. X  
  43. X!         "@(#)README    1.4 1/8/91 Kent Landfield"
  44. X  
  45. X  This directory contains the source to lc. lc is much like the ls 
  46. X  command except it separates the types of files into groups and then
  47. X--- 1,7 ----
  48. X  
  49. X              LC
  50. X  
  51. X!         "@(#)README    1.5 2/3/91 Kent Landfield"
  52. X  
  53. X  This directory contains the source to lc. lc is much like the ls 
  54. X  command except it separates the types of files into groups and then
  55. X***************
  56. X*** 113,118 ****
  57. X--- 113,127 ----
  58. X  INTERNET: kent@sparky.IMD.Sterling.COM or UUCP: uunet!sparky!kent
  59. X  
  60. X  so that I can continue to improve the functionality and portability of lc.
  61. X+ 
  62. X+ Just a note for historical interest: David Tanguay of Software Development 
  63. X+ Group, University of Waterloo informs me that LC stands for "list catalog".
  64. X+ GCOS TSS on the Honeywell used the term "catalog", meaning (roughly) the
  65. X+ same thing as a Unix directory. The GCOS file system maintenance program
  66. X+ was called ACCE (short for access), a Swiss Army knife type program, and
  67. X+ one of its sub-functions was LC, which gave the usual baroque display.
  68. X+ A separate LC program was written to give the more commonly wanted structure
  69. X+ info, and CLIS (for catalog listing) to give a more "ls -l" type of display.
  70. X  
  71. X              -Kent+
  72. X  
  73. Xdiff -c ../lc.old/lc.c ./lc.c
  74. X*** ../lc.old/lc.c    Sun Feb  3 22:20:07 1991
  75. X--- ./lc.c    Sun Feb  3 22:25:53 1991
  76. X***************
  77. X*** 1,7 ****
  78. X  /*
  79. X  ** This software is 
  80. X  **
  81. X! ** Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 by Kent Landfield.
  82. X  **
  83. X  ** Permission is hereby granted to copy, distribute or otherwise 
  84. X  ** use any part of this package as long as you do not try to make 
  85. X--- 1,8 ----
  86. X  /*
  87. X  ** This software is 
  88. X  **
  89. X! ** Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990,
  90. X! **               1991 by Kent Landfield.
  91. X  **
  92. X  ** Permission is hereby granted to copy, distribute or otherwise 
  93. X  ** use any part of this package as long as you do not try to make 
  94. X***************
  95. X*** 54,60 ****
  96. X  ** on your system ? Options -s, -L or -l won't be available..)
  97. X  **
  98. X  **  History:
  99. X! **      Initially designed on an IBM-XT running Coherent in 1984.
  100. X  **      Ported to XENIX on an IBM-AT in 1984.
  101. X  **      Ported to System V on AT&T 3Bs in 1985.
  102. X  **      Ported to DEC Vax 11/750 running System V in 1986.
  103. X--- 55,62 ----
  104. X  ** on your system ? Options -s, -L or -l won't be available..)
  105. X  **
  106. X  **  History:
  107. X! **      This implementation initially designed on an 
  108. X! **           IBM-XT running Coherent in 1984.
  109. X  **      Ported to XENIX on an IBM-AT in 1984.
  110. X  **      Ported to System V on AT&T 3Bs in 1985.
  111. X  **      Ported to DEC Vax 11/750 running System V in 1986.
  112. X***************
  113. X*** 70,80 ****
  114. X  **      Tested with AmigaDOS 1.3 on an Amiga 1000 in 1989.
  115. X  **      Tested with SunOS 4.0.3 on a Sparkstation 1 in 1989.
  116. X  **      Tested with AIX 3.+ on a Risc System/6000 in 1990. 
  117. X! **      Ivan Fris added the ability to combine "only" options.
  118. X  **                                                               
  119. X  */
  120. X  #ifndef lint
  121. X! static char *sccsid = "@(#)lc.c    1.25 1/2/91  Kent Landfield";
  122. X  #endif
  123. X  
  124. X  #include <stdio.h>
  125. X--- 72,83 ----
  126. X  **      Tested with AmigaDOS 1.3 on an Amiga 1000 in 1989.
  127. X  **      Tested with SunOS 4.0.3 on a Sparkstation 1 in 1989.
  128. X  **      Tested with AIX 3.+ on a Risc System/6000 in 1990. 
  129. X! **      Ivan Fris added the ability to combine "only" options in 1990.
  130. X! **      Mike Peterson ported it to the Apollo Domain/OS SR10.2 in 1990.
  131. X  **                                                               
  132. X  */
  133. X  #ifndef lint
  134. X! static char *sccsid = "@(#)lc.c    1.26 2/3/91  Kent Landfield";
  135. X  #endif
  136. X  
  137. X  #include <stdio.h>
  138. X***************
  139. X*** 152,159 ****
  140. X  #ifdef S_IFBLK
  141. X  #  define BLOCK_ONLY    1<<4
  142. X  #endif
  143. X! #ifdef S_IFIFO
  144. X  #  define FIFO_ONLY     1<<5
  145. X  #endif
  146. X  #ifdef S_IFLNK
  147. X  #  define LNK_ONLY      1<<6
  148. X--- 155,164 ----
  149. X  #ifdef S_IFBLK
  150. X  #  define BLOCK_ONLY    1<<4
  151. X  #endif
  152. X! #ifndef apollo
  153. X! # ifdef S_IFIFO
  154. X  #  define FIFO_ONLY     1<<5
  155. X+ # endif
  156. X  #endif
  157. X  #ifdef S_IFLNK
  158. X  #  define LNK_ONLY      1<<6
  159. X***************
  160. X*** 194,202 ****
  161. X--- 199,209 ----
  162. X  struct list Dirs = { 0, 0, (char **) NULL, 0 };
  163. X  struct list Fls = { 0, 0, (char **) NULL, 0 };
  164. X  
  165. X+ #ifndef apollo
  166. X  #ifdef S_IFIFO
  167. X  struct list Fifos = { 0, 0, (char **) NULL, 0 };
  168. X  #endif
  169. X+ #endif
  170. X  
  171. X  #ifdef S_IFLNK
  172. X  struct list Lnks = { 0, 0, (char **) NULL, 0 };
  173. X***************
  174. X*** 225,233 ****
  175. X--- 232,242 ----
  176. X  struct list Dirs = { 0, 0, (char **) NULL };
  177. X  struct list Fls = { 0, 0, (char **) NULL };
  178. X  
  179. X+ #ifndef apollo
  180. X  #ifdef S_IFIFO
  181. X  struct list Fifos = { 0, 0, (char **) NULL };
  182. X  #endif
  183. X+ #endif
  184. X  
  185. X  #ifdef S_IFLNK
  186. X  struct list Lnks = { 0, 0, (char **) NULL };
  187. X***************
  188. X*** 602,610 ****
  189. X          flag = pr_info("Shared Data Files: ", &Sds, flag, Sort_wanted);
  190. X  #endif
  191. X  
  192. X! #ifdef S_IFIFO
  193. X      if (Fifos.num > 0 && (Only == 0 || Only & FIFO_ONLY))
  194. X          flag = pr_info("Fifo Files: ", &Fifos, flag, Sort_wanted);
  195. X  #endif
  196. X  
  197. X  #ifdef S_IFCHR
  198. X--- 611,621 ----
  199. X          flag = pr_info("Shared Data Files: ", &Sds, flag, Sort_wanted);
  200. X  #endif
  201. X  
  202. X! #ifndef apollo
  203. X! # ifdef S_IFIFO
  204. X      if (Fifos.num > 0 && (Only == 0 || Only & FIFO_ONLY))
  205. X          flag = pr_info("Fifo Files: ", &Fifos, flag, Sort_wanted);
  206. X+ # endif
  207. X  #endif
  208. X  
  209. X  #ifdef S_IFCHR
  210. X***************
  211. X*** 795,800 ****
  212. X--- 806,812 ----
  213. X          break;
  214. X  #endif
  215. X  
  216. X+ #ifndef apollo
  217. X  #ifdef S_IFIFO
  218. X      case S_IFIFO:
  219. X          if (!Allfiles && sav_str[0] == '.')
  220. X***************
  221. X*** 806,811 ****
  222. X--- 818,824 ----
  223. X  #endif
  224. X          break;
  225. X  #endif
  226. X+ #endif
  227. X  
  228. X  #ifdef S_IFLNK
  229. X      case S_IFLNK:
  230. X***************
  231. X*** 890,895 ****
  232. X--- 903,909 ----
  233. X                  break;
  234. X  #endif
  235. X  
  236. X+ #ifndef apollo
  237. X  #ifdef S_IFIFO
  238. X              case S_IFIFO:
  239. X                  add_to_list(&Fifos, sav_str);
  240. X***************
  241. X*** 899,904 ****
  242. X--- 913,919 ----
  243. X  #endif
  244. X                  break;
  245. X  #endif
  246. X+ #endif
  247. X  
  248. X  #ifdef S_IFSOCK
  249. X              case S_IFSOCK :
  250. X***************
  251. X*** 1007,1016 ****
  252. X          Sort_wanted = FALSE;
  253. X          break;
  254. X  
  255. X! #ifdef S_IFIFO
  256. X      case 'F':
  257. X          Only |= FIFO_ONLY;
  258. X          break;
  259. X  #endif
  260. X  
  261. X      case '1':
  262. X--- 1022,1033 ----
  263. X          Sort_wanted = FALSE;
  264. X          break;
  265. X  
  266. X! #ifndef apollo
  267. X! # ifdef S_IFIFO
  268. X      case 'F':
  269. X          Only |= FIFO_ONLY;
  270. X          break;
  271. X+ # endif
  272. X  #endif
  273. X  
  274. X      case '1':
  275. X***************
  276. X*** 1407,1412 ****
  277. X--- 1424,1430 ----
  278. X                  break;
  279. X  #endif
  280. X  
  281. X+ #ifndef apollo
  282. X  #ifdef S_IFIFO
  283. X              case S_IFIFO:
  284. X                  if (Display_single)
  285. X***************
  286. X*** 1413,1418 ****
  287. X--- 1431,1437 ----
  288. X                     (void) printf("%s: fifo file\n", buf);
  289. X                  break;
  290. X  #endif
  291. X+ #endif
  292. X  
  293. X  #ifdef S_IFSOCK
  294. X              case S_IFSOCK:
  295. X***************
  296. X*** 1468,1477 ****
  297. X--- 1487,1498 ----
  298. X                  Dirs.maxlen = Fls.maxlen = 0;
  299. X  #endif
  300. X  
  301. X+ #ifndef apollo
  302. X  #ifdef S_IFIFO
  303. X                  Fifos.num = 0;
  304. X  #ifdef LENS
  305. X                  Fifos.maxlen = 0;
  306. X+ #endif
  307. X  #endif
  308. X  #endif
  309. X  
  310. END_OF_FILE
  311. if test 7138 -ne `wc -c <'lc.patch2'`; then
  312.     echo shar: \"'lc.patch2'\" unpacked with wrong size!
  313. fi
  314. # end of 'lc.patch2'
  315. fi
  316. echo shar: End of shell archive.
  317. exit 0
  318. exit 0 # Just in case...
  319. -- 
  320. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  321. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  322. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  323. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  324.